package org.sws.domain.activity.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author sws
 * @Date 2025/3/26 09:22
 * @description:
 */
@Getter
@AllArgsConstructor
public enum UserAccountCountFlagVO {

    DAY("day"),

    MONTH("month"),

    TOTAL("total"),
    NULL("null")
    ;

    private final String code;

    public static UserAccountCountFlagVO getByCode(String code) {
        for (UserAccountCountFlagVO value : UserAccountCountFlagVO.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return NULL;
    }
}
